Use HTTP health check for llama-stack/ogx container#123
Conversation
Replace the TCP socket readiness probe with a proper HTTP GET on /v1/health. Also, add a startup probe and liveness probe that will start only after the startup one succeeds. Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: umago The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
internal/controller/lcore_deployment.go (1)
78-78: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winExtract
/v1/healthinto a shared constant.Using one constant avoids probe-path drift when this endpoint changes.
Suggested diff
+const llamaStackHealthPath = "/v1/health" + llamaStackContainer := corev1.Container{ @@ StartupProbe: &corev1.Probe{ ProbeHandler: corev1.ProbeHandler{ HTTPGet: &corev1.HTTPGetAction{ - Path: "/v1/health", + Path: llamaStackHealthPath, Port: intstr.FromInt32(LlamaStackContainerPort), }, }, @@ LivenessProbe: &corev1.Probe{ ProbeHandler: corev1.ProbeHandler{ HTTPGet: &corev1.HTTPGetAction{ - Path: "/v1/health", + Path: llamaStackHealthPath, Port: intstr.FromInt32(LlamaStackContainerPort), }, }, @@ ReadinessProbe: &corev1.Probe{ ProbeHandler: corev1.ProbeHandler{ HTTPGet: &corev1.HTTPGetAction{ - Path: "/v1/health", + Path: llamaStackHealthPath, Port: intstr.FromInt32(LlamaStackContainerPort), }, },Also applies to: 89-89, 100-100
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@internal/controller/lcore_deployment.go` at line 78, Extract the hardcoded "/v1/health" probe path into a shared constant and update all uses in the deployment controller so they reference that symbol instead of repeating the literal. Apply this in the code that builds the probe configuration around the deployment setup logic, using the existing deployment-related functions and structs as the touchpoints so the readiness, liveness, and startup probes stay consistent if the endpoint changes.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@internal/controller/lcore_deployment.go`:
- Line 78: Extract the hardcoded "/v1/health" probe path into a shared constant
and update all uses in the deployment controller so they reference that symbol
instead of repeating the literal. Apply this in the code that builds the probe
configuration around the deployment setup logic, using the existing
deployment-related functions and structs as the touchpoints so the readiness,
liveness, and startup probes stay consistent if the endpoint changes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 7fa91c72-b782-4e08-8bb1-36c947f7a8cf
📒 Files selected for processing (1)
internal/controller/lcore_deployment.go
Replace the TCP socket readiness probe with a proper HTTP GET on /v1/health.
Also, add a startup probe and liveness probe that will start only after the startup one succeeds.
Summary by CodeRabbit